package com.ruoyi.system.service.zhaungxiuservice.shopService.impl;

import com.ruoyi.system.domain.zhuangxiumain.shopMain.ProductPicInfo;
import com.ruoyi.system.mapper.zhuangxiumapper.shopMapper.ProductPicInfoMapper;
import com.ruoyi.system.service.zhaungxiuservice.shopService.ProductPicInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductPicInfoServiceImpl implements ProductPicInfoService {
    @Autowired(required = false)
    private ProductPicInfoMapper productPicInfoMapper;

    /**
     * 查询商品图片信息
     *
     * @param productPicId 商品图片信息ID
     * @return 商品图片信息
     */
    @Override
    public ProductPicInfo selectProductPicInfoById(Integer productPicId)
    {
        return productPicInfoMapper.selectProductPicInfoById(productPicId);
    }

    /**
     * 查询商品图片信息列表
     *
     * @param productId 商品图片信息
     * @return 商品图片信息
     */
    @Override
    public List<ProductPicInfo> selectProductPicInfoList(Integer productId)
    {
        return productPicInfoMapper.selectProductPicInfoList(productId);
    }

    /**
     * 新增商品图片信息
     *
     * @param productPicInfo 商品图片信息
     * @return 结果
     */
    @Override
    public int insertProductPicInfo(ProductPicInfo productPicInfo)
    {
        return productPicInfoMapper.insertProductPicInfo(productPicInfo);
    }

    /**
     * 修改商品图片信息
     *
     * @param productPicInfo 商品图片信息
     * @return 结果
     */
    @Override
    public int updateProductPicInfo(ProductPicInfo productPicInfo)
    {
        return productPicInfoMapper.updateProductPicInfo(productPicInfo);
    }

    /**
     * 批量删除商品图片信息
     *
     * @param productPicIds 需要删除的商品图片信息ID
     * @return 结果
     */
    @Override
    public int deleteProductPicInfoByIds(Integer[] productPicIds)
    {
        return productPicInfoMapper.deleteProductPicInfoByIds(productPicIds);
    }

    /**
     * 删除商品图片信息信息
     *
     * @param productPicId 商品图片信息ID
     * @return 结果
     */
    @Override
    public int deleteProductPicInfoById(Integer productPicId)
    {
        return productPicInfoMapper.deleteProductPicInfoById(productPicId);
    }
}
